package com.metnods;

/**
 * 电动车类
 * 2017-08-15
 * @author Erik
 * @version 0.1
 * @see NonMotor
 */
public class ElectricVehicle extends NonMotor {
    private String batterKind;

    public ElectricVehicle(){}

    /**
     * 单参数构造
     * 初始化电池品牌参数
     * @param batterKind   电池品牌
     */
    public ElectricVehicle(String batterKind){ this.setBatterKind(batterKind);}

    public void setBatterKind(String batterKind){   this.batterKind=batterKind;}
    public String getBatterKind()   {   return this.batterKind; }

    @Override
    public String work() {
        String str="这是一辆使用"+this.getBatterKind()+"牌电池的电动车";
        return str;
    }
}
